package com.graduation.ucenter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.ucenter.model.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 小何
 * @Description: TODO
 * @DateTime: 2023/9/20 15:34
 **/
@Mapper
public interface UserMapper extends BaseMapper<User> {
    List<String> selectPermissionByUserId(@Param("Id") int Id);

    int addRoleUser(@Param("userId") Integer userId,@Param("roleId") Integer roleId);

    int judgeRoleUserContains(@Param("userId")Integer userId,@Param("roleId")Integer roleId);

    void removeRoleUser(@Param("userId")Integer userId,@Param("roleId")Integer roleId);

    void addAllAuthority(@Param("authorities") List<Integer>authorities);

    List<Integer>listAuthority();

    void addUserRole(@Param("userId") Integer userId);
}
